import request from "../utils/request";

export const reqCrriculumAnalysis = ({ curriculum, level }) => request({
    url: '/query/UserNum',
    params: {
        className: curriculum,
        level
    }
})

export const reqGradeDetail = ({ curriculum, level }) => request({
    url: '/query/GradeDetail',
    params: {
        className: curriculum,
        level
    }
})
// requrriculumAnalysis, reqGradeDetail
export const reqGradePredict = ({ userId, mid }) => request({
    url: '/query/Predict',
    data: {
        userId,
        mid: 1
    },
    method: 'POST'
})

export const reqAverageScore = ({ userId }) => request({
    url: '/query/AvgScore',
    data: {
        userId
    },
    method: 'POST'
})
// http://localhost:8181/query/score?level=1&ClassId=07410913-200212166-1
export const reqscore = ({ level, ClassId, stuId, term, type, year, major }) => request({
    url: '/query/score',
    params: {
        level,
        ClassId,
        stuId,
        term,
        type,
        year,
        major
    }
})


export const reqShowRes = (StuId) => request({
    url: '/Eval/ShowRes',
    params: {
        StuId
    }
})

export const reqLinks = () => request({
    url: '/Rec/links',
})

export const getCurriculums = (params) => request({
    url: `/teacher/getAllClass?TeacherId=${3890001}`,
})

export const getClassByClassId = (ClassId) => request({
    url: '/teacher/getClassStudent',
    params: {
       ClassId
    }
})

export const getSearchAPI = (params) => request({
    url: '/neo4j/findByNameLike',
    params
})

export const getIntrodectionAPI = (params) => request({
    url: '/neo4j/search',
    params 
})

export const getEcharts = () => request({
    url: '/neo4j/echarts',
})

export const getRecommend = (StuId) => request({
    url: '/Rec/studyRec',
    params: {
        StuId
    }
})
export const getProblemRec = (params) => request({
    url: '/Rec/problemRec',
    params
})

